Skip to content

Drop the ui module and shared/ — nothing imported them - #8

Merged
brentrager merged 1 commit into
mainfrom
chore/drop-unused-ui-module
Aug 26, 2026
Merged

Drop the ui module and shared/ — nothing imported them#8
brentrager merged 1 commit into
mainfrom
chore/drop-unused-ui-module

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Step 2 of 2 resolving the ui / client-shared duplication (pearl th-596512). Merge SmooAI/ui#10 first — it removes the drift gate that reads the directory this PR deletes.

Why

This crate carried a byte-identical copy of SmooAI/ui's design system and called itself that crate's successor. The migration was never finished, and an org-wide code search settles who actually needs what:

consumer what it uses
smooai_client_shared::ui nobody only self-references inside this repo
smooai_client_shared::auth the th CLI all 39 imports
smooai-ui smooblue, observability-studio the design system, directly

Two copies of the same files is a drift surface, and it had already drifted: this crate spent weeks serving a monogram with no inner 'S' and a styles.css missing the entire .input family, with nothing red. Deleting the copy removes the failure mode rather than detecting it.

What's removed

  • rust/src/ui/ and shared/ — the duplicate design system.
  • rust/build.rs and the serde_json build-dependency — they existed only to generate the tokens module.
  • The ../shared/** entries in include, and the ui feature.

auth becomes the only feature and stays opt-in. It's what the one consumer asks for, but its tree (tokio, reqwest, axum) is heavy enough to be explicit about rather than default.

Docs in lib.rs and the README described a design-system crate; both now describe an auth library and point at SmooAI/ui.

No consumer impact

th is rev-pinned and asks for features = ["auth"], which is unchanged. smooblue and observability-studio never depended on this crate at all.

Verified locally

cargo fmt --check                                        OK
cargo clippy --all-targets -- -D warnings                clean
cargo clippy --all-targets --all-features -- -D warnings clean
cargo test --all-features                                28 passed
cargo check --features auth                              OK (the th build)
scripts/check-module-tree.py                             ✓

Net: 1,194 deletions, 54 insertions.

🤖 Generated with Claude Code

https://claude.ai/code/session_0152bbE1veqfG1SVJdyLCBxC

This crate carried a byte-identical copy of SmooAI/ui's design system and
described itself as that crate's successor. The migration was never
finished, and an org-wide search found NOTHING importing
`smooai_client_shared::ui` — the real design-system consumers (smooblue,
observability-studio) depend on SmooAI/ui directly, and this crate's one
consumer, the `th` CLI, builds `features = ["auth"]` and never touched it.

Two copies of the same files is a drift surface, and it had already
drifted: this crate spent weeks serving a monogram missing its inner 'S'
and a styles.css that had lost the whole `.input` family, with nothing red.
Deleting the copy removes the failure mode instead of detecting it.

Removed: rust/src/ui/, shared/, rust/build.rs (it existed only to generate
the tokens module), the serde_json build-dependency, the ../shared/**
include entries, and the `ui` feature. `auth` is now the only feature and
stays opt-in — it is what the one consumer asks for, and its tree (tokio,
reqwest, axum) is heavy enough to be explicit about.

Docs rewritten: lib.rs and README described a design-system crate. They now
describe an auth library and point at SmooAI/ui for the design system.

SmooAI/ui#10 removes the now-pointless shared-drift gate and lands first, so
neither repo has a red window.

Verified: cargo fmt --check, clippy (default + all-features, --all-targets
-D warnings), cargo test --all-features (28 passed), check-module-tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152bbE1veqfG1SVJdyLCBxC
@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 89b1476

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brentrager
brentrager merged commit f47f3f0 into main Aug 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant